Skip to content

Validate the ZoneId of the DateTime with ZoneId #961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 8, 2022

Conversation

bigmontz
Copy link
Contributor

@bigmontz bigmontz commented Jul 5, 2022

The validation of the DateTime was only being done in the new patched protocol while unpacking the struct. This changes force any new DateTime with ZoneID to have a valid ZoneId.

This changes also treats struct unpacking errors and defers the occurred to the moment the object is manipulate. For instance, a DateTime with invalid ZoneId returned in a Record will not break the records consumption until any code try to interacts with the broken DateTime.

bigmontz added 3 commits July 1, 2022 17:29
The validation of the DateTime was only being done in the new patched protocol while unpacking the struct. This changes force any new DateTime with ZoneID to have a valid ZoneId.

This changes also treats struct unpacking errors and defers the occurred to the moment the object is manipulate. For instance, a DateTime with invalid ZoneId returned in a Record will not break the records consumption until any code try to interacts with the broken DateTime.
@@ -1,21 +1,42 @@

function asComposablePredicate (predicate) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sleek design 👏 🔥

bigmontz and others added 2 commits July 5, 2022 16:02
Co-authored-by: Robsdedude <dev@rouvenbauer.de>
@bigmontz bigmontz merged commit dca78b3 into neo4j:5.0 Jul 8, 2022
@bigmontz bigmontz deleted the 5.0-treat-struct-construction-errors branch July 8, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants